﻿
@*
    author Hws
*@
@{
    ViewData["Title"] = "AuthMenu";
    Layout = "";
}
<!DOCTYPE html>
<html>
	<head>
		<title>AuthMenuManager</title>
		
		<meta name="keywords" content="">
		<meta name="description" content="this is my page">
		<meta name="content-type" content="text/html; charset=UTF-8">
		
		<script type="text/javascript">var basePath = '@ViewData["basePath"]';</script>
		<link rel='stylesheet' href='https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css' />
		<link rel='stylesheet' href='/css/admin/default.css' />
		<link rel='stylesheet' href='https://at.alicdn.com/t/font_625704_ctakys56p03haor.css' />
		<script src='/javascript/jquery3.1.1.min.js' type='text/javascript'></script>
		<script src='/javascript/vue.js' type='text/javascript'></script>
		<script src='https://unpkg.com/element-ui@2.13.0/lib/index.js' type='text/javascript'></script>
		<script src='/javascript/custom/label.js' type='text/javascript'></script>
		<script src='/javascript/custom/constant.js' type='text/javascript'></script>
		<script src='/javascript/custom/common.js' type='text/javascript'></script>
		<script src='/javascript/custom/ajax.js' type='text/javascript'></script>
		<script src='/javascript/custom/cache.js' type='text/javascript'></script>
		<style type="text/css">
			/*自定义style*/
		
		</style>
	</head>
	<body>
		<div id="app">
			<el-container>
			  <el-header class="headerClass" style="height:auto;" v-loading.fullscreen.lock="fullscreenLoading" >
  					<!-- 查询表单 -->
	  				<el-form inline ref="queryForm" :model="queryForm" class="queryForm" label-width="110px" label-suffix=":" :size="size" >
			  			<el-row class="row-bg">
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.id' prop = 'id' > 
								<el-input clearable v-model = 'queryForm.id' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.title' prop = 'title' > 
								<el-input clearable v-model = 'queryForm.title' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.node' prop = 'node' > 
								<el-input clearable v-model = 'queryForm.node' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.name' prop = 'name' > 
								<el-input clearable v-model = 'queryForm.name' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.url' prop = 'url' > 
								<el-input clearable v-model = 'queryForm.url' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
		  		        <el-col :span='8'>
					        <el-form-item :label='fieldLabel.left' prop='left' >
						        <el-select multiple collapse-tags v-model='queryForm.left' placeholder='' >
							        <el-option v-for='item in lefts' :key='item.code' :label='item.label' :value='item.code' ></el-option>
						        </el-select>
					        </el-form-item>
				        </el-col>
													
			  			<el-col :span='8'>
							<el-form-item :label = 'fieldLabel.icon' prop = 'icon' > 
								<el-input clearable v-model = 'queryForm.icon' placeholder = '' ></el-input >
							</el-form-item >
						</el-col > 
													
		  		        <el-col :span='8'>
					        <el-form-item :label='fieldLabel.state' prop='state' >
						        <el-select multiple collapse-tags v-model='queryForm.state' placeholder='' >
							        <el-option v-for='item in states' :key='item.code' :label='item.label' :value='item.code' ></el-option>
						        </el-select>
					        </el-form-item>
				        </el-col>
												</el-row>
			  		</el-form>
			  		<!-- 查询按钮栏 -->
	  				<el-menu mode="horizontal" class="queryFormMenu" :size="size" >
				      	<el-menu-item index="1" @@click="toolBarSearch">
				        	<i class="el-icon-search"></i>
				        	<span>{{btnLabel.query}}</span>
				      	</el-menu-item>
				      	<el-menu-item index="2" @@click="toolBarReset">
				        	<i class="el-icon-refresh"></i>
				        	<span>{{btnLabel.reset}}</span>
				      	</el-menu-item>
				      	<el-menu-item index="3" @@click="toolBarAdd" v-show="funAuthority.add" >
				        	<i class="el-icon-plus"></i>
				        	<span>{{btnLabel.add}}</span>
				      	</el-menu-item>
				      	<el-menu-item index="4" @@click="toolBarDel" v-show="funAuthority.del" >
				        	<i class="el-icon-close"></i>
				        	<span>{{btnLabel.del}}</span>
				      	</el-menu-item>
				      	<el-menu-item index="5" @@click="toolBarExport" v-show="funAuthority.exported"  >
				        	<i class="el-icon-download"></i>
				        	<span >{{btnLabel.exported}}</span>
				      	</el-menu-item>
			      		<!-- <el-submenu index="6">
				        	<template slot="title" >
					        	<i class="el-icon-zoom-in"></i>
				          		<span slot="title" >快捷查询</span>
				        	</template>
					        <el-submenu index="6-1">
					          	<template slot="title" >创建时间</template>
					          	<el-menu-item index="6-1-1" @@click="toolBarQuickQuery1('today')">今天</el-menu-item>
					          	<el-menu-item index="6-1-2" @@click="toolBarQuickQuery1('week')">一周</el-menu-item>
					          	<el-menu-item index="6-1-3" @@click="toolBarQuickQuery1('month')">一个月</el-menu-item>
				        	</el-submenu>
				         	<el-submenu index="6-2">
					        	<template slot="title" >创建时间</template>
					          	<el-menu-item index="6-2-1" @@click="toolBarQuickQuery1('today')">今天</el-menu-item>
					          	<el-menu-item index="6-2-2" @@click="toolBarQuickQuery1('week')">一周</el-menu-item>
					          	<el-menu-item index="6-2-3" @@click="toolBarQuickQuery1('month')">一个月</el-menu-item>
			          	 	</el-submenu>
			      		</el-submenu> -->
				    </el-menu>
			  </el-header>
			  	<el-container>
				    <el-container>
				      <el-main class="mainClass" >
				      <!-- 数据表格 -->
				      	<el-table center border highlight-current-row fit stripe ref="datas" :data="datas"  class="datas" 
				      		:max-height="datasHeight" v-loading="datasLoading" @@row-dblclick="datasRowDbClick"  @@selection-change="datasSelectionChange" :size="size" @@close="clearForm('detailForm')" >
							<el-table-column type="selection" property="selected" > </el-table-column>
							<el-table-column type="index" label="#" :index="indexRender" ></el-table-column>
						 	<el-table-column type="expand">
				      			<template slot-scope="scope">
						        	<el-form label-position="right" inline class="datasExpandForm" label-suffix=":" :size="size"  >
									 
																		
										<el-form-item :label='fieldLabel.id'>
											<span>{{scope.row.id}}<span >
										</el-form-item >
																		
										<el-form-item :label='fieldLabel.title'>
											<span>{{scope.row.title}}<span >
										</el-form-item >
																		
										<el-form-item :label='fieldLabel.node'>
											<span>{{scope.row.node}}<span >
										</el-form-item >
																		
										<el-form-item :label='fieldLabel.name'>
											<span>{{scope.row.name}}<span >
										</el-form-item >
																		
										<el-form-item :label='fieldLabel.url'>
											<span>{{scope.row.url}}<span >
										</el-form-item >
															
										<el-form-item :label='fieldLabel.left'>
											<span>{{scope.row.leftLabel}}<span >
										</el-form-item >
																		
										<el-form-item :label='fieldLabel.icon'>
											<span>{{scope.row.icon}}<span >
										</el-form-item >
															
										<el-form-item :label='fieldLabel.state'>
											<span>{{scope.row.stateLabel}}<span >
										</el-form-item >
															        	</el-form>
						      	</template>
						    </el-table-column>
							
															
                                <el-table-column show-overflow-tooltip property='id' :label='fieldLabel.id' :formatter='idRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='title' :label='fieldLabel.title' :formatter='titleRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='node' :label='fieldLabel.node' :formatter='nodeRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='name' :label='fieldLabel.name' :formatter='nameRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='url' :label='fieldLabel.url' :formatter='urlRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='left' :label='fieldLabel.left' :formatter='leftRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='icon' :label='fieldLabel.icon' :formatter='iconRender' ></el-table-column>
															
                                <el-table-column show-overflow-tooltip property='state' :label='fieldLabel.state' :formatter='stateRender' ></el-table-column>
														<el-table-column fixed="right" :label="btnLabel.operation" width="150px" >
						      	<template slot-scope="scope">
									<a href="javascript:;;" :title="btnLabel.detail" >
					      				<el-button circle type="primary" icon="el-icon-info" :size="size" @@click="datasInfo(scope.$index, scope.row)" />
									</a>
									<a href="javascript:;;" :title="btnLabel.edit" >
					      				<el-button circle type="success" icon="el-icon-edit" v-show="funAuthority.update" :size="size" @@click="datasUpdate(scope.$index, scope.row)" ></el-button>
					      			</a>
					      			<a href="javascript:;;" :title="btnLabel.del" >
					        			<el-button circle type="danger" icon="el-icon-delete" v-show="funAuthority.del" :size="size" @@click="datasDel(scope.$index, scope.row)" ></el-button>
						      		</a>
						      	</template>
						    </el-table-column>
						</el-table> 
				      	<el-pagination background class="pagebar"
					      	@@size-change="pageBarSizeChange" 
					      	@@current-change="pageBarCurrentChange" 
					      	:current-page="pageBarCurrentPage" 
					      	:page-sizes="[10, 20, 30]" 
					      	:page-size="pageBarPageSize" 
					      	layout="total, sizes, prev, pager, next, jumper" 
					      	:total="pageBarDatasTotal" :size="size" />
				      </el-main>
				    </el-container>	
			  </el-container>
			</el-container>
			
			<el-dialog :visible.sync="detailDialogVisible" :title="detailDialogTitle" :close-on-click-modal="false" width="500px" class="detailDialog" :size="size" >
			    <el-form ref="detailForm" :model="detailForm" :rules="detailFormRules" label-width="110px" class="detailForm tooltipForm" label-suffix=":" :size="size" >
			    	<el-row>
						 
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.id' prop='id' >
							<el-input-number clearable v-model='detailForm.id' ></el-input-number>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.title' prop='title' >
							<el-input clearable v-model='detailForm.title'></el-input>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.node' prop='node' >
							<el-input clearable v-model='detailForm.node'></el-input>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.name' prop='name' >
							<el-input clearable v-model='detailForm.name'></el-input>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.url' prop='url' >
							<el-input clearable v-model='detailForm.url'></el-input>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.left' prop='left' >
									<el-select v-model='detailForm.left' placeholder='' >
									<el-option v-for=' item in lefts ' :key='item.code' :label='item.label' :value='item.code' ></el-option>
							</el-select>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.icon' prop='icon' >
							<el-input clearable v-model='detailForm.icon'></el-input>
							</el-form-item>
						</el-col>
												
						<el-col :span='22' >
							<el-form-item :label='fieldLabel.state' prop='state' >
									<el-select v-model='detailForm.state' placeholder='' >
									<el-option v-for=' item in states ' :key='item.code' :label='item.label' :value='item.code' ></el-option>
							</el-select>
							</el-form-item>
						</el-col>
											</el-row>
				</el-form>
				<div slot="footer" class="dialog-footer" >
					<el-button plain type="primary" v-show="detailDialogUpdateBtn" @@click="dialogUpdate" :size="size">{{btnLabel.update}}</el-button>
			    	<el-button plain type="primary" v-show="detailDialogAddBtn" @@click="dialogAdd" :size="size">{{btnLabel.add}}</el-button>
			    	<el-button plain type="warning" @@click="dialogReset" :size="size" >{{btnLabel.reset}}</el-button>
					<el-button plain type="info" @@click="detailDialogVisible = false" :size="size">{{btnLabel.close}}</el-button>
			  	</div>
			</el-dialog>
		</div>
	</body>
	<script type="text/javascript" >
		var isInitQuery = top._isInitQuery||false;
		var size = top._size||'medium';
		
		var fieldLabel = {
		
				 id:'id', 
				 title:'标题', 
				 node:'节点', 
				 name:'名称', 
				 url:'路径', 
				 left:'left', 
				 icon:'icon', 
				 state:'状态', 
		
		}
		
		var modular = 'admin/AuthMenu/';
		var requestUrl = basePath + modular;
		
		var vm = new Vue({
		  	el: '#app',
		  	data:function (){
		  		return {
		  			/* 全局变量 */
		  			size:size,
		  			/* 文本标题 */
		  			fieldLabel:fieldLabel,
		  			stateLabel:stateLabel,
		  			btnLabel:btnLabel,
		  			msgLabel:msgLabel,
		  			rulesMsgLabel:rulesMsgLabel,
		  			titleLabel:titleLabel,
		  			dateLabel:dateLabel,
		  			/* 类型数据 */
					
										
					lefts:[],
										
					states:[],
							  			/* 功能权限 */
		  			funAuthority:{
		  				add:false,
		  				edit:false,
		  				delete:false,
		  				exported:false,
		  			},
		  			fullscreenLoading:true,
		  			/* 查询表单 */
		  			queryForm:{ 
					
						id:null,
					
						title:null,
					
						node:null,
					
						name:null,
					
						url:null,
					
						left:null,
					
						icon:null,
					
						state:null,
					 
		  			},
		  			queryFormSelectDates:_pickerSelectDates,
		  			/* 表格数据 */
		  			datas:[],
		  			datasHeight:500,
		  			datasLoading:false,
		  			datasCurrentRow:0,
		  			datasSelection:[],
		  			pageBarCurrentPage:1,
		  			pageBarPageSize:10,
		  			pageBarDatasTotal:0,
		  			/* 明细窗口 */
		  			detailDialogVisible:false,
		  			detailDialogClickModalClose:false,
		  			detailForm:{
					
						id:null,
					
						title:null,
					
						node:null,
					
						name:null,
					
						url:null,
					
						left:null,
					
						icon:null,
					
						state:null,
					 
		  			},
		  			detailFormRules:{

						
                        id:[
                        { type: 'number' , max:(Math.pow(10, 10) - 1) , message: rulesMsgLabel.length.replace('F', fieldLabel.id).replace('N', 10) , trigger: 'blur'}
                        ],
												
                        title:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.title) , trigger: 'change' },
                        ],
												
                        node:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.node) , trigger: 'change' },
                        ],
												
                        name:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.name) , trigger: 'change' },
                        ],
												
                        url:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.url) , trigger: 'change' },
                        ],
												
                        left:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.left) , trigger: 'change' },
                        ],
												
                        icon:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.icon) , trigger: 'change' },
                        ],
												
                        state:[
                                { required: true, message: rulesMsgLabel.required.replace('F', fieldLabel.state) , trigger: 'change' },
                        ],
												 
						 
		  			},
		  			detailDialogUpdateBtn:false,
		  			detailDialogAddBtn:false,
		  			detailDialogTitle:''
		  		}
		  	},
		  	methods : {
		  		/* 初始化所有类型  */
				loadTypes() {  
						
					this.lefts = getType('AuthMenuLeft');
						
					this.states = getType('AuthMenuState');
								       	},
		       	/* 初始化所有列表 */
		       	loadList() { 
		       		
		       	},
		       	/* 初始化功能权限 */
		       	loadBtnAuthority (){
		       		this.funAuthority = $.extend({}, this.funAuthority,  getFunAuthority('${AuthorityName}') );
		       	},
		  		/* 查询表单方法 */
		       	getQueryParams () {
		       		var fields = [ 
											
						{field:'id' , type:"eq" , value:vm.queryForm.id },
						
						{field:'title' , type:"like" , value:vm.queryForm.title ? ('%' + vm.queryForm.title + '%') : '' },
						
						{field:'node' , type:"like" , value:vm.queryForm.node ? ('%' + vm.queryForm.node + '%') : '' },
						
						{field:'name' , type:"like" , value:vm.queryForm.name ? ('%' + vm.queryForm.name + '%') : '' },
						
						{field:'url' , type:"like" , value:vm.queryForm.url ? ('%' + vm.queryForm.url + '%') : '' },
						
						{field:'left' , type:"in" , value:vm.queryForm.left },
						{field:'icon' , type:"like" , value:vm.queryForm.icon ? ('%' + vm.queryForm.icon + '%') : '' },
						
						{field:'state' , type:"in" , value:vm.queryForm.state },		  			]
		  			var page = {
	  					size:vm.pageBarPageSize,
	  					page:vm.pageBarCurrentPage
		  			}
		  			var sort = [
		  				{ field:'id', type:'desc' }
	  				]
		  			var params = {
		  				page :page,
		  				sort:sort,
		  				fields:fields
		  			}
		       		return params;
		       	},
		       	toolBarSearch() {
		  			vm.datasLoading = true;
		  			vm.datasResetHeight();
		  			Ajax.list( {
			  			url: requestUrl + 'list' ,
			  			data: vm.getQueryParams (), 
			  			callback: function (datas , length ){
			  				if (!validatePage(length)){return;};  
			  				vm.datas = datas;
			  				vm.datasLoading = false;
			  				vm.pageBarDatasTotal = length;
			  			}
		  			})
		       	},
		       	toolBarReset() {
		       		vm.$refs['queryForm'].resetFields();
	       		},
	       		toolBarAdd() {
	       			vm.detailDialogVisible = true;
	       			vm.detailDialogUpdateBtn = false;
	       			vm.detailDialogAddBtn = true;
	       			
	       			vm.detailForm = {
					
						id:null,
					
						title:null,
					
						node:null,
					
						name:null,
					
						url:null,
					
						left:null,
					
						icon:null,
					
						state:null,
					 
		  			};
	       			
										
					vm.detailForm.left = vm.lefts[0].code;
	       								
					vm.detailForm.state = vm.states[0].code;
	       				       			vm.detailDialogTitle = vm.titleLabel.addDialog ;
	       		},
	       		toolBarDel() {
	       			if (!vm.datasSelection || vm.datasSelection.length == 0 ) {
	       				message(vm.msgLabel.delUnselectd)
	       				return ;
       				}
	       			vm.$confirm( vm.msgLabel.delBatchConfirm.replace('N', vm.datasSelection.length ), '', {
	                 	confirmButtonText: vm.btnLabel.confirm ,
	                 	cancelButtonText:  vm.btnLabel.cancel  ,
	                 	type: 'warning'
	               	}).then(() => {
	               		var array = new Array();
	               		for (var i in vm.datasSelection) {
	               			array.push( vm.datasSelection[i].id );
	               		} 
	               		Ajax.del( {
				  			url: requestUrl + 'delete/' + array.join(',') ,
				  			callback: function (datas , length ){
				  				vm.toolBarSearch();
				  			}
			  			})
	               	}).catch(() => {
	               		
	               });
	       		},
	       		toolBarExport() {
	       			Ajax.exported( {
			  			url: requestUrl + 'export' ,
			  			data: vm.getQueryParams() , 
			  			callback: function (datas , length ){
			  				
			  			}
		  			})
	       		},
				toolBarQuickQuery1( ) {
       				
	       		},
	       		/* 数据表格方法 */
	       		indexRender(index){
		       	  	return index +1;
		  		},
  					/* 数据表格渲染方法 */
					
								
				idRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
				titleRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
				nodeRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
				nameRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
				urlRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
                leftRender (row, column, cellValue){
                    var label = getTypeLabel( 'AuthMenuLeft', cellValue );
                    row.leftLabel = label;
                    return label;
                },
								
				iconRender ( row, column, cellValue ) {
                    return cellValue;
                },
								
                stateRender (row, column, cellValue){
                    var label = getTypeLabel( 'AuthMenuState', cellValue );
                    row.stateLabel = label;
                    return label;
                },
						       	datasResetHeight () {	// 重新渲染高度
		       		vm.datasHeight = $('.el-main').outerHeight() - $('.pagebar').outerHeight();
		       	},
		       	datasRowDbClick( row ) { 	// 行双击事件
		       		vm.datasInfo(null , row);
		       	},
		       	datasSelectionChange(val){	// 行选中事件
		       		vm.datasSelection = val;
		       	},
	       		datasInfo( index , row ) {	// 详情按钮事件
	       			vm.$refs['datas'].toggleRowExpansion(	row );
	       		},
	       		datasUpdate( index , row ) {// 编辑按钮事件
	       			Ajax.get( {
			  			url: requestUrl + 'get/' + row.id ,
			  			callback: function (datas , length ){
			  				$.extend(vm.detailForm, datas);
			  				vm.detailDialogVisible = true;
				  			vm.detailDialogUpdateBtn = true;
				  			vm.detailDialogAddBtn = false;
				  			vm.detailDialogTitle = vm.titleLabel.editDialog ;
			  			}
		  			})
	       		},
	       		datasDel( index , row ) {	// 删除按钮事件
	       		 	vm.$confirm( vm.msgLabel.delConfirm , '', {
	                 	confirmButtonText: vm.btnLabel.confirm ,
	                 	cancelButtonText: vm.btnLabel.cancel ,
	                 	type: 'warning'
	               	}).then(() => {
	               		Ajax.del( {
				  			url: requestUrl + 'delete/' + row.id ,
				  			callback: function (datas , length ){
				  				vm.toolBarSearch()
				  			}
			  			})
	               	}).catch(() => {
	               		
	               });
	       		},
	       			/* 数据表格分页方法 */
		  		pageBarCurrentChange(val){	// 改变当前页
		  			vm.pageBarCurrentPage = val;
		  			vm.toolBarSearch()
		  		},
		  		pageBarSizeChange(val){		// 改变最大记录数
		  			vm.pageBarCurrentPage = 1;
		  			vm.pageBarPageSize = val;
		  			vm.toolBarSearch()
		  		},
		  		/* 明细窗口方法 */
		  		clearForm( id ) { clearForm( id ) },
		  		dialogAdd() {
	  			 	vm.$refs['detailForm'].validate((valid) => {
  		          		if (valid) {
		  		        	Ajax.add( {
					  			url: requestUrl + 'add' ,
					  			data: $.extend({} , {state:1} , vm.detailForm , {id:0}) ,
					  			callback: function (datas , length ){
					  				vm.$confirm( vm.msgLabel.addContinue, '', {
					                 	confirmButtonText: vm.btnLabel.continued ,
					                 	cancelButtonText: vm.btnLabel.cancel ,
					                 	type: 'success'
					               	}).then(() => {
					               		
					               	}).catch(() => {
					               		vm.detailDialogVisible = false;
					  					vm.toolBarSearch();
					               });
					  			}
			  				})	
	  		          	}
  		          	})
		  		},
		  		dialogUpdate() {
		  			vm.$refs['detailForm'].validate((valid) => {
  		          		if (valid) {
				  			Ajax.update( {
					  			url: requestUrl + 'update' ,
					  			data:vm.detailForm, 
					  			callback: function (datas , length ){
					  				setTimeout(()=>{
					  					vm.detailDialogVisible = false;
					  					vm.toolBarSearch();
					  				}, 500)
					  			}
				  			})	
	          		}});
		  		},
		  		dialogReset(){
		  			vm.$refs['detailForm'].resetFields();
		  		}
	 	 	} ,
 	 		mounted : function() {
 	 			$('body').css( 'visibility', 'visible');
 	 			setTimeout( function () {
	 	 			if (isInitQuery) {
	 	 				vm.toolBarSearch();
	 	 			}
	 	 			vm.loadList(); 
	 	 			vm.loadTypes();
	 	 			vm.loadBtnAuthority();
	 	 			vm.fullscreenLoading = false;
 	 			} , 500 )
			}
		});
	</script>
</html>


                